/*
 Navicat Premium Dump SQL

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80403 (8.4.3)
 Source Host           : localhost:33069
 Source Schema         : test

 Target Server Type    : MySQL
 Target Server Version : 80403 (8.4.3)
 File Encoding         : 65001

 Date: 11/01/2025 13:30:27
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for Comments
-- ----------------------------
DROP TABLE IF EXISTS `Comments`;
CREATE TABLE `Comments` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `userId` int unsigned NOT NULL,
  `dishId` int unsigned NOT NULL,
  `date` date DEFAULT NULL,
  `score` decimal(4,2) DEFAULT '0.00',
  `comment` text,
  `likeCount` int unsigned DEFAULT '0',
  `createdAt` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedAt` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `userId` (`userId`,`dishId`,`date`)
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of Comments
-- ----------------------------
BEGIN;
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (5, 1, 1, '2025-01-01', 3.50, '真好吃呀11', 0, '2025-01-05 11:37:55', '2025-01-05 11:44:09');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (7, 1, 1, '2025-01-02', 3.50, '真好吃呀', 0, '2025-01-05 11:39:31', '2025-01-05 11:39:31');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (8, 1, 2, '2025-01-02', 3.50, '真好吃呀', 0, '2025-01-05 11:39:37', '2025-01-05 11:39:37');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (9, 1, 3, '2025-01-02', 3.50, '真好吃呀', 0, '2025-01-05 11:39:53', '2025-01-05 11:39:53');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (10, 2, 3, '2025-01-02', 3.50, '真好吃呀', 0, '2025-01-05 11:40:14', '2025-01-05 11:40:14');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (12, 2, 4, '2025-01-02', 3.50, '真好吃呀', 0, '2025-01-05 12:09:17', '2025-01-05 12:09:17');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (13, 2, 5, '2025-01-02', 3.50, '真好吃呀', 0, '2025-01-05 12:09:56', '2025-01-05 12:09:56');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (14, 3, 6, '2025-01-02', 5.00, '真好吃呀', 0, '2025-01-05 12:19:25', '2025-01-05 12:19:25');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (15, 3, 7, '2025-01-02', 5.00, '真好吃呀11', 0, '2025-01-05 12:19:45', '2025-01-05 12:37:51');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (18, 1, 9, '2025-01-02', 2.50, '真好吃呀', 0, '2025-01-05 12:44:23', '2025-01-05 12:44:23');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (20, 1, 32, '2025-01-10', 5.00, '老婆做的就是好吃', 0, '2025-01-10 14:40:10', '2025-01-10 14:40:10');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (21, 1, 36, '2025-01-11', 4.50, '味道不错', 1, '2025-01-11 04:02:31', '2025-01-11 04:22:14');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (22, 2, 36, '2025-01-11', 3.50, '味道不错', 1, '2025-01-11 04:03:36', '2025-01-11 04:22:13');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (25, 2, 37, '2025-01-11', 4.50, '好吃，还想再吃', 0, '2025-01-11 05:26:32', '2025-01-11 05:26:32');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (26, 2, 40, '2025-01-11', 1.50, '全是肥肉，不好吃', 1, '2025-01-11 05:26:45', '2025-01-11 05:27:50');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (27, 2, 42, '2025-01-11', 4.50, '有那个味了', 0, '2025-01-11 05:26:56', '2025-01-11 05:26:56');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (28, 2, 44, '2025-01-11', 4.50, '菜不错，但是吃的人不多', 1, '2025-01-11 05:27:19', '2025-01-11 05:28:09');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (29, 3, 37, '2025-01-11', 1.00, '难吃哦，苦死了', 0, '2025-01-11 05:27:40', '2025-01-11 05:27:40');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (30, 3, 40, '2025-01-11', 5.00, '好吃，爱吃', 0, '2025-01-11 05:27:49', '2025-01-11 05:27:49');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (31, 3, 42, '2025-01-11', 4.00, '还行吧', 0, '2025-01-11 05:27:59', '2025-01-11 05:27:59');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (32, 3, 44, '2025-01-11', 0.50, '不吃这个', 0, '2025-01-11 05:28:07', '2025-01-11 05:28:07');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (33, 4, 37, '2025-01-11', 3.00, '真的难吃啊', 0, '2025-01-11 05:28:30', '2025-01-11 05:28:30');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (34, 4, 40, '2025-01-11', 3.50, '一般般吧', 0, '2025-01-11 05:28:40', '2025-01-11 05:28:40');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (36, 4, 44, '2025-01-11', 2.00, '', 0, '2025-01-11 05:28:49', '2025-01-11 05:28:49');
INSERT INTO `Comments` (`id`, `userId`, `dishId`, `date`, `score`, `comment`, `likeCount`, `createdAt`, `updatedAt`) VALUES (37, 4, 42, '2025-01-11', 1.00, '', 0, '2025-01-11 05:29:20', '2025-01-11 05:29:20');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
